Completed Week 3 JavaScript assignments Daryna Tkachenko#8
Open
dashaaaa21 wants to merge 1 commit intoHackYourAssignment:mainfrom
Open
Completed Week 3 JavaScript assignments Daryna Tkachenko#8dashaaaa21 wants to merge 1 commit intoHackYourAssignment:mainfrom
dashaaaa21 wants to merge 1 commit intoHackYourAssignment:mainfrom
Conversation
dardecena
approved these changes
Sep 9, 2025
Comment on lines
+14
to
+16
| return numbers | ||
| .filter(number => number % 2 === 0) | ||
| .map(number => number * 2); |
Comment on lines
+33
to
+37
| function computeEarnings(tasks, hourlyRate) { | ||
| const total = tasks | ||
| .map(task => task.duration / 60 * hourlyRate) | ||
| .reduce((sum, value) => sum + value, 0); | ||
| return `€${total.toFixed(2)}`; |
There was a problem hiding this comment.
Nice! Clear naming for function parameters. Clean code and nice use of string templating.
Comment on lines
+29
to
31
| function sanitizeFruitBasket(basket, fruitToRemove) { | ||
| return basket.filter(fruit => fruit !== fruitToRemove); | ||
| } |
There was a problem hiding this comment.
Way to go! Clear, easy-to-read function.
Comment on lines
+37
to
+39
|
|
||
| sanitizeFruitBasket.length; | ||
| expect(sanitizeFruitBasket.length).toBe(2); |
Comment on lines
+45
to
+47
|
|
||
| sanitizeFruitBasket(fruitBasket, 'lemon'); | ||
| expect(fruitBasket).toEqual(originalFruitBasketContents); |
| c: 'amount, this, wallet' | ||
| }, | ||
| answer: '?', | ||
| answer: 'b', |
| c: 'transferInto, anonymous' | ||
| }, | ||
| answer: '?', | ||
| answer: 'c', |
| c: 'Step' | ||
| }, | ||
| answer: '?', | ||
| answer: 'a', |
| c: 'Transferring € 50,00 from Jack to Jane' | ||
| }, | ||
| answer: '?', | ||
| answer: 'a', |
| c: 'Jane' | ||
| }, | ||
| answer: '?', | ||
| answer: 'c', |
Author
|
Thank you very much for reviewing my work, I appreciate your feedback!!! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.